home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / shells / kiss-0.11 / kiss-0 / kiss / src / catfile.c < prev    next >
C/C++ Source or Header  |  1995-03-23  |  314b  |  22 lines

  1. #include "kiss.h"
  2.  
  3. void catfile (FILE *inf, char *name, int showname, int printonly)
  4. {
  5.     int
  6.     ch;
  7.     
  8.     if (showname)
  9.     printf ("\n%s\n", name);
  10.  
  11.     while (1)
  12.     {
  13.     ch = fgetc (inf);
  14.     if (feof (inf))
  15.         break;
  16.     if (! isprint (ch) && printonly)
  17.         printf ("\\%2.2x", ch);
  18.     else
  19.         putchar (ch);
  20.     }
  21. }
  22.